package com.app.web.action;

import java.sql.SQLException;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.app.modules.web.pagetag.Page;
import com.app.web.bean.Para;
import com.app.web.service.TestService;
import com.opensymphony.xwork2.ActionSupport;

@SuppressWarnings("serial")
public class ParaAction extends ActionSupport {
	private Logger logger = LoggerFactory.getLogger(this.getClass());
	
	//  每页显示3行，默认每页显示5行.
	private Page page = new Page(3);

	public List<Para> getParaList() throws SQLException {
		logger.debug("执行 {} 类的 {} 方法.",new String[]{this.getClass().toString(),"List getParaList()"});
	
		TestService testService = new TestService();
		return testService.findPara(page);
	}

	public Page getPage() {
		return page;
	}
}
